﻿using Abp.Application.Services;
using FwProject.Shop.Dto;
using FwProject.ShopApplication;
using FwProject.ShoppingMall.Shop;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using X.PagedList;

namespace FwProject.Shop
{
    public interface IShopProductAppService : IApplicationService
    {
        Task<LayerDataBaseDto> GetCommodityLayerDataAsync(int page, int limit, string keyword, Guid? ShopTypeid, ShopProductFlag? shopProductFlag);

        Task<List<ShopProductOutputDto>> GetExportCommodityDataAsync(string keyword, Guid? ShopTypeid);

        Task<LayerDataBaseDto> GetNewAddCommodityAsync();

        Task<IPagedList<ShopProductOutputDto>> GetPageListAsync(int page, int limit, string keyword);

        Task<ShopProductCreateDto> GetCreateDtoAsync(Guid typeId);

        Task<ShopProductEditDto> GetEditDtoAsync(Guid id);

        Task<Guid> CreateAsync(ShopProductEnterDto input);

        Task ModifyAsync(Guid id, ShopProductEnterDto input);

        ShopProductDto GetById(Guid id);

        SearchSuggestDto GetSearchSuggestData(string keyword);

        #region app使用到
        /// <summary>
        /// 获取热销产品
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<IPagedList<ShopProductHotDto>> GetHotShopProduct(int page, int pageSize);
                /// <summary>
                /// 写入搜索引擎
                /// </summary>
                /// <param name="id"></param>
                /// <returns></returns>
                ShopProductAppDto GetShopProductAppDto(Guid id);
                /// <summary>
                /// 获取商品的详细情况
                /// </summary>
                /// <param name="id"></param>
                /// <returns></returns>
               Task<ShopProductDetailsAppDto> GetAppDetailsShopProduct(Guid id);
                /// <summary>
                /// 生成到搜索引擎中
                /// </summary>
                /// <param name="id"></param>
                /// <returns></returns>
               ShopProductListAppDto GetListAppDto(Guid id);
                /// <summary>
                /// 搜索引擎查询
                /// </summary>
                /// <param name="keyword"></param>
                /// <param name="page"></param>
                /// <param name="pageSize"></param>
                /// <param name="ShopTypeid"></param>
                /// <param name="Brandid"></param>
                /// <returns></returns>
               Task<List<ShopProductListAppDto>> ShopSearch(SearchFilter searchFilter);
               Task<List<ShopProductAppDto>> ShopTestSearch(SearchFilter searchFilter);
               Task<List<ShopProductListAppDto>> ShopTypeSearch(SearchFilter searchFilter);

                /// <summary>
                 /// app用户常用请单
                /// </summary>
               /// <param name="page"></param>
              /// <param name="pageSize"></param>
              /// <returns></returns>
             Task<IPagedList<ShopProductListAppDto>> GetCommonList(int page, int pageSize);

        #endregion
    }
}
